Knob Flags
Knob flags specify characteristics of a knob. They are used in the
flags
field of a knob description record. Some flags describe the type of values a knob takes and others describe the user interface. Knob type flags are mutually exclusive, so only one should be set (all knob type flag constants begin "
kKnobType
").
enum {
kKnobReadOnly = 16,
kKnobInterruptUnsafe = 32,
kKnobKeyrangeOverride = 64,
kKnobGroupStart = 128,
kKnobFixedPoint8 = 1024,
kKnobFixedPoint16 = 2048,
kKnobTypeNumber = 0 << 12,
kKnobTypeGroupName = 1 << 12,
kKnobTypeBoolean = 2 << 12,
kKnobTypeNote = 3 << 12,
kKnobTypePan = 4 << 12,
kKnobTypeInstrument = 5 << 12,
kKnobTypeSetting = 6 << 12,
kKnobTypeMilliseconds = 7 << 12,
kKnobTypePercentage = 8 << 12,
kKnobTypeHertz = 9 << 12,
kKnobTypeButton = 10 << 12
};
Constant descriptions
-
kKnobReadOnly
-
The knob value cannot be changed by the user or with a set knob call.
-
kKnobInterruptUnsafe
-
Alter this knob only from foreground task time.
-
kKnobKeyrangeOverride
-
The knob can be overridden within a single key range (software synthesizer only).
-
kKnobGroupStart
-
The knob is first in some logical group of knobs.
-
kKnobFixedPoint8
-
Interpret knob numbers as fixed-point 8-bit.
-
kKnobFixedPoint16
-
Interpret knob numbers as fixed-point 16-bit.
-
kKnobTypeNumber
-
The knob value is a numerical value.
-
kKnobTypeGroupName
-
The name of the knob is really a group name for display purposes.
-
kKnobTypeBoolean
-
The knob is an on/off knob. If the range of the knob (as specified by the low value and high value in the knob description record) is greater than one, the knob is a multi-checkbox field.
-
kKnobTypeNote
-
The knob value range is equivalent to MIDI keys.
-
kKnobTypePan
-
T knob value is the pan setting and is within a range (as specified by the low value and high value in the knob description record) that goes from left to right.
-
kKnobTypeInstrument
-
The knob value is a reference to another instrument number.
-
kKnobTypeSetting
-
The knob value is one of n different discrete settings--for example, items on a pop-up menu.
-
kKnobTypeMilliseconds
-
The knob value is in milliseconds.
-
kKnobTypePercentage
-
The knob value is a percentage of the range.
-
kKnobTypeHertz
-
The knob value represents frequency.
-
kKnobTypeButton
-
The knob is a momentary trigger push button.
© 1997 Apple Computer, Inc.Previous | Chapter Top | Chapter Contents | Next